﻿Imports System.ComponentModel

Public Class WebResourceInfo
    Implements INotifyPropertyChanged


    Private m_GuidId As String = System.Guid.NewGuid().ToString()
    Public Property GuidId() As String
        Get
            Return m_GuidId
        End Get
        Set(ByVal value As String)
            m_GuidId = value
            Me.OnPropertyChanged("GuidId")
        End Set
    End Property

    Private m_RowNum As Integer
    Public Property RowNum() As Integer
        Get
            Return m_RowNum
        End Get
        Set(ByVal value As Integer)
            m_RowNum = value
            Me.OnPropertyChanged("RowNum")
        End Set
    End Property


    Private m_ResourceType As ResourceType = Service.ResourceType.None
    Public Property ResourceType() As ResourceType
        Get
            Return m_ResourceType
        End Get
        Set(ByVal value As ResourceType)
            m_ResourceType = value
            Me.OnPropertyChanged("ResourceType")
        End Set
    End Property

    Private m_Title As String
    Public Property Title() As String
        Get
            Return m_Title
        End Get
        Set(ByVal value As String)
            m_Title = value
            Me.OnPropertyChanged("Title")
        End Set
    End Property

    Private m_Url As String = String.Empty
    Public Property Url() As String
        Get
            Return m_Url
        End Get
        Set(ByVal value As String)
            m_Url = value
            Me.OnPropertyChanged("Url")
        End Set
    End Property

    Private m_SourceUrl As String
    Public Property SourceUrl() As String
        Get
            Return m_SourceUrl
        End Get
        Set(ByVal value As String)
            m_SourceUrl = value
            Me.OnPropertyChanged("SourceUrl")
        End Set
    End Property

    Private m_SavePath As String
    Public Property SavePath() As String
        Get
            Return m_SavePath
        End Get
        Set(ByVal value As String)
            m_SavePath = value
            Me.OnPropertyChanged("SavePath")
        End Set
    End Property

    Private m_Size As String
    Public Property [Size]() As String
        Get
            Return m_Size
        End Get
        Set(ByVal value As String)
            m_Size = value
            Me.OnPropertyChanged("Size")
        End Set
    End Property

    Private m_ProgressPercentage As Integer
    Public Property ProgressPercentage() As Integer
        Get
            Return m_ProgressPercentage
        End Get
        Set(ByVal value As Integer)
            m_ProgressPercentage = value
            Me.OnPropertyChanged("ProgressPercentage")
        End Set
    End Property

    Private m_CreationTime As DateTime
    Public Property CreationTime() As DateTime
        Get
            Return m_CreationTime
        End Get
        Set(ByVal value As DateTime)
            m_CreationTime = value
            Me.OnPropertyChanged("CreationTime")
        End Set
    End Property

    Private m_ResStatus As ResourceStatus
    Public Property ResStatus() As ResourceStatus
        Get
            Return m_ResStatus
        End Get
        Set(ByVal value As ResourceStatus)
            m_ResStatus = value
            Me.OnPropertyChanged("ResStatus")
        End Set
    End Property

    Private m_Information As String
    Public Property Information() As String
        Get
            Return m_Information
        End Get
        Set(ByVal value As String)
            m_Information = value
            Me.OnPropertyChanged("Information")
        End Set
    End Property


    Private m_IsVisit As Boolean = False
    ''' <summary>
    ''' 是否已访问
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Property IsVisit() As Boolean
        Get
            Return m_IsVisit
        End Get
        Set(ByVal value As Boolean)
            m_IsVisit = value
            Me.OnPropertyChanged("IsVisit")
        End Set
    End Property

    Public Event PropertyChanged(sender As Object, e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Protected Sub OnPropertyChanged(propertyName As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
    End Sub

End Class
